"""
    Global Configuration.
"""

'''
    Debug.
'''
DEBUG = True
DEBUG_OUTPUT_CONSOLE = 'console'
DEBUG_OUTPUT_FILE = 'file'
DEBUG_OUTPUT = DEBUG_OUTPUT_CONSOLE

'''
    PNG
'''
PNG_CHANNELS = 255

'''
    Mitsuba setting
'''
Using_specNormals = True
convert_normal_into_tangent = False
batch_input = True
render_quantity = 200
Using_pplastic = True
using_pytorch_renderer = True

"""
    List the scene's parameter name for alter their data in code without checking their name.
"""
pn_principled_base_color = 'texture.nested_bsdf.base_color.data'
pn_principled_specular_trans = 'texture.nested_bsdf.spec_trans.data'
pn_principled_normal_map = 'texture.normalmap.data'

pn_pplastic_diffuse = 'texture.nested_bsdf.diffuse_reflectance.data'
pn_pplastic_specular = 'texture.nested_bsdf.specular_reflectance.data'
pn_pplastic_normal = 'texture.normalmap.data'


diffuse_albedo_key = pn_pplastic_diffuse if Using_pplastic else pn_principled_base_color
specular_albedo_key = pn_pplastic_specular if Using_pplastic else pn_principled_specular_trans
normal_map_key = pn_pplastic_normal if Using_pplastic else pn_principled_normal_map

"""
    Using in principled BSDF.
    Whether apple (1 - x) operation to all value of Specular map.
"""
invert_specular = False

'''
    Path parameter.
'''
project_base_path = 'F:/code/graphics/0/mitsuba-RealFaceDB-rendering/'
DEBUG_Texture_basePath = project_base_path + 'data/texture/'
resource_base_path = 'D:/dataset/AvatarMe/RealFaceDB/realfacedb/'
scene_base_path = project_base_path + 'data/scenes/'
temporary_filepath = project_base_path + 'temp/'
log_output_path = project_base_path + 'log/'

_output_dict_name = 'BSDF' \
    + ('_specNormal' if Using_specNormals else '_diffNormal') \
    + ('_tangent_space' if convert_normal_into_tangent else '_object_space') \
    + '/'
_output_base_path = project_base_path + 'output/' + \
                    ('DEBUG/' if DEBUG else '') +\
                    ('pplastic/' if Using_pplastic else 'principled/')
_output_pytorch_path = project_base_path + 'output/pytorch_rendering/'
output_path = (_output_base_path + _output_dict_name) if not using_pytorch_renderer else _output_pytorch_path
